using System;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.Core;

namespace Yuanlin.Business
{
    [ParseChildren(true), PersistChildren(false)]
    public class RecommendedView : Control
    {
        protected override void CreateChildControls()
        {
            Controls.Clear();

            ITemplate template =  ProductTemplate;

            if (template != null)
            {
                Control cntrl = new Control();
                template.InstantiateIn(cntrl);
                Controls.Add(cntrl);
            }

        }

        [Browsable(false),PersistenceMode(PersistenceMode.InnerProperty)]
        public ITemplate ProductTemplate
        {
            get { return _productTemplate; }
            set { _productTemplate = value; }
        }
        private ITemplate _productTemplate;

    }

}
